import java.io.*;

public class InputOutput implements JSInputOutput {

	BufferedReader userInput;
	public InputOutput()
	{
		userInput = new BufferedReader(new InputStreamReader(System.in));
	}
	

	public String userPrompt(JSDirectory workDir) {
		
		String promtFormat = String.format("%s# ", workDir.getAddress()); //Build user prompt based on the current working directory
		System.out.print(promtFormat);
		String rtn_value = "";
		try 
		{
			rtn_value = userInput.readLine(); //and read in user input
		} 
		catch (IOException e) 
		{
			e.printStackTrace();
		}
		
		return rtn_value;
		
	}

	public void print(String printMe) {
		
		//print output to console
		if (printMe.length() > 0) {
			System.out.println(printMe);
		}
		
	}

}
